package com.hfy.shop.service.impl;

import com.hfy.model.po.good.CommonGoodPo;
import com.hfy.model.po.good.VipPo;
import com.hfy.shop.mapper.GoodMapper;
import com.hfy.shop.service.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import result.Result;

import java.util.List;

/**
 * @ author 韩
 * time: 2024/9/9 11:27
 */
@Service
public class GoodServiceImpl implements GoodService {

    @Autowired
    private GoodMapper goodMapper;
    @Override
    public Result getCommonVips() {
        List<VipPo> commonVips = goodMapper.getAnyVips(0);
        return Result.ok(commonVips);
    }
    @Override
    public Result getVeryVips() {
        List<VipPo> veryVips = goodMapper.getAnyVips(1);
        return Result.ok(veryVips);
    }

    @Override
    public Result getCommonGoods() {
        List<CommonGoodPo> commonGoods = goodMapper.getCommonGoods(1);
        return Result.ok(commonGoods);
    }

}
